//
//  WYNewsDetailController.m
//  WYNews
//
//  Created by 曾佳豪 on 2017/3/18.
//  Copyright © 2017年 haodada.com. All rights reserved.
//

#import "WYNewsDetailController.h"
#import "WYNetworkTool+News.h"
@interface WYNewsDetailController ()
@property(nonatomic,strong)UIWebView *webView;
@end

@implementation WYNewsDetailController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    _webView =[[UIWebView alloc]initWithFrame:self.view.bounds];
    //设置
    _webView .backgroundColor=[UIColor whiteColor];
    //设置滚动速度
    _webView.scrollView.decelerationRate =UIScrollViewDecelerationRateNormal;
    [self.view addSubview:_webView];
    //加载数据
    [self loadData];

}
-(void)loadData{
    //获取详细页的数据 并展示
    
    [[WYNetworkTool sharedTool]requestNewsDetail:_model.docid callBack:^(NSString *bodyString) {
       //加载html字符串
        [_webView loadHTMLString:bodyString baseURL:nil];
        
    }];
    
    
}


@end
